//封装的懒加载
import LoadAble from '../utils/Loadable'
// 一级路由的入口
import Home from '../pages/home/index'
import Recommend from '../pages/recommend/index'
import RankingList from '../pages/rankingList'
import Diantai from '../pages/diantai'
import LiveStreaming from '../pages/liveStreaming'
import Login from '../pages/login/index'
import Registry from '../pages/registry/index'
import Logreg from '../pages/logreg'
import Songdetail from '../pages/songdetail'

//二级路由的入口
import Find from '../pages/home/find/index'
import Mine from '../pages/home/mine'
import Video from '../pages/home/video'
import Yuncun from '../pages/home/yuncun'
export default [
  {
    path: '/',
    redirect: '/logreg'
  },
  {
    path: '/home',
    title: '首页',
    component: Home,
    children: [
      {
        path: '/home',
        redirect: '/home/find'
      },
      {
        path: '/home/mine',
        title: '我的',
        component: Mine
      },
      {
        path: '/home/find',
        title: '发现',
        component: Find
      },
      {
        path: '/home/yuncun',
        title: '云村',
        component: Yuncun
      },
      {
        path: '/home/video',
        title: '视频',
        component: Video
      },
    ]
  },
  {
    path:'/recommend',
    component:Recommend,
  },
  {
    path:'/songList',
    component: LoadAble(()=>import('../pages/songList'))
  },
  {
    path:'/rankingList',
    component:RankingList,
  },
  {
    path:'/diantai',
    component:Diantai,
  },
  {
    path:'/liveStreaming',
    component:LiveStreaming,
  },
  {
    path:'/login',
    title: '登陆',
    component:Login,
  },
  {
    path:'/registry',
    title: '注册',
    component:Registry,
  },
  {
    path:'/songdetail',
    title: '歌曲详情',
    component:Songdetail,
  },
  {
    path:'/logreg',
    title: '登陆/注册',
    component:Logreg,
  },
]